<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%@ include file="/common/pre/header.jsp" %>
    <script src="/statics/js/backend/backend.js"></script>

 <script type="text/javascript">
	
	function del(thisId,classroomId){
		
				if(confirm("确认删除吗")){
			   window.location.href = "/1and5Demo/student/delStudentAll?id="+thisId+"&classroomId="+classroomId;
			  }
			  else{
			 
			   return;
			  }
			}
		
	
	

</script>
</head>
<body>
	<c:if test="${user == null}">
		<c:redirect url="login.jsp"></c:redirect>
	</c:if>
		
	<c:if test="${empty studentList}">
		<c:redirect url="/student/finStudent"></c:redirect>
    </c:if>
<div class="i_bg bg_color">
    <!--Begin 用户中心 Begin -->
    <div class="m_content">

        <div class="m_right" id="content">
            <div class="mem_tit">学生列表</div>
           <p align="right">
                <a href="/1and5Demo/student/finStudent?id=${id }" class="add_b">刷新</a>              
                <a onclick="window.history.back()" class="add_b">返回</a>
           
               
                <br>
            </p>
            <br>
            <table border="0" class="order_tab" style="width:750px; text-align:center; margin-bottom:30px;"
                   cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                    <td width="5%">学生ID</td>
                    <td width="5%">学生名称</td>
                    <td width="5%">所属电脑</td>
                    <td width="5%">所在班级</td>
                    <td width="5%">所在机房</td>
                     <td width="5%">联系方式</td>
                      <td width="5%">住       址</td>
                    <td width="5%" colspan="2">操作</td>
                </tr>
                <c:forEach items="${studentList}" var="temp">
                    <tr>
                        <td>${temp.stuno}</td>
                         <td>${temp.stuname}</td>
                        <td>${temp.computerId}</td>
                        <td>${temp.classsName}</td>
                        <td>${temp.computerroomName}</td>
                        <td>${temp.phone}</td>
                         <td>${temp.address}</td>
                        
                        
                        <td>
                            <a href="/1and5Demo/student/findOne?id=${temp.id}">修改</a>
                        </td>
                      <td>
                        	<c:if test="${sessionScope.loginUser.id!=temp.id}">
                           		 <a onclick="del(${temp.id},'${id }')">删除</a>
                        	</c:if>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
       <%@ include file="/pagerBar.jsp" %>
        </div>
    </div>

</div>
</body>
</html>


